<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/react.development.js"></script>
    <script src="./lib/react-dom.development.js"></script>
    <script src="./lib/babel.min.js"></script>
</head>
<body>
<div id="root">

</div>

</body>
<script type="text/babel">
    // style属性的值必须是一个对象
    const root = ReactDOM.createRoot(document.querySelector("#root"));
    const s = {background: "red", color: "yellow"};
    const background = "red";
    const color = "yellow";
    root.render((
        <div>
            <p style={{background: "red", color: "yellow"}}>我现在过的很好，你现在还好吗？</p>
            <p style={s}>我现在过的很好，你现在还好吗？</p>
            <p style={{background, color}}>我现在过的很好，你现在还好吗？</p>
        </div>
    ));
</script>
</html>